<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>新增跟进</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />
    <!--标签插件-->
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <!-- 评分插件 -->
    <link rel="stylesheet" href="/css/materialdesignicons.min.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>

    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/contactManager/clueFollow.css"/>
    <style>
        .bv-form .help-block{
            position: absolute;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="card addCluePoll">
        <div class="card-header">
            <h1></h1>
        </div>
        <form class="card-body">
            <div class="well form-well">
                <!--跟进方式：1-线上电话；2-拜访 3-微信 4-线下电话 5-邮箱 6-陪访-->
                <input type="hidden" name="type" id="type" th:value="${type}">
                <!--线索id-->
                <input type="hidden" name="id" id="id" >
                <!--线索池id-->
                <input type="hidden" name="poolId" id="poolId" >
                <!--从哪跳转到该页面（0：线索；1：客户）-->
                <input type="hidden" name="source" id="source" th:value="${source}">
                <div class="row">
<!--                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">-->
<!--                        <label class="control-label">跟进方式</label>-->
<!--                        <div class="form-content">-->
<!--                            <input id="followUpMode" disabled type="text" class="form-control" value="">-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad">
                        <label for="customerInput" class="control-label label-required">客户名称</label>
                        <div class="form-content peers-display">
                            <select id="customerInput" name="customerInput" class="form-control selectpicker" title="请选择" data-live-search="true">
                                <option value="1">数据加载中，请稍后...</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12 col-pad">
                        <label for="followUpTime" class="control-label label-required">跟进时间</label>
                        <div class="form-content peers-display">
                            <input id="followUpTime" name="followUpTime" type="text" class="form-control" placeholder="请选择"  data-live-search="true">
                        </div>
                    </div>
<!--                    <div class="clearfix hidden-xs"></div>-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label for="nextFollowTime" class="control-label ">下次跟进时间</label>
                        <div class="form-content">
                            <input id="nextFollowTime" type="text" name="nextFollowTime" class="form-control" placeholder="请输选择" autocomplete="off">
                        </div>
                    </div>
                    <!--邮件(5)拜访方式联系人姓名、电话非必填 显示联系人邮箱字段-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <!-- 线索联系人id -->
                        <label class="control-label label-required" th:if="${type} == 5" for="name">联系人姓名</label>
                        <label class="control-label label-required" th:if="${type} != 5" for="name">联系人姓名</label>
                        <div class="form-content">
                            <input onclick="changeName();" readonly style="background: #fff;" id="name" name="name" type="text" class="form-control" placeholder="请输入联系人姓名" autocomplete="off">
                            <ul id="nameBox" class="dropdown-menu"></ul>
                        </div>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label" th:if="${type} == 5" for="phone">联系人电话</label>
                        <label class="control-label label-required" th:if="${type} != 5" for="phone">联系人电话</label>
                        <div class="input-group">
                            <input id="phone" name="phone" type="text" class="form-control" placeholder="请输入联系人电话" oninput="value=value.replace(/[^\d]/g,'')">
                            <span class="input-group-addon">分机号</span>
                            <div class="input-group-btn">
                                <input type="text" id="extNumber" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" style="width: 100px;">
                            </div>
                        </div>
<!--                        <div class="form-content">-->
<!--&lt;!&ndash;                            onkeyup="value=value.replace(/[^\d]/g,'')"&ndash;&gt;-->
<!--                            <input id="phone" type="text" name="phone" class="form-control" placeholder="请输入联系人电话" maxlength="11" >-->
<!--                        </div>-->
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" th:if="${type} == 5">
                        <label class="control-label label-required" for="email">联系人邮箱</label>
                        <div class="form-content">
                            <input id="email" name="email" type="text" class="form-control" placeholder="请输入联系人邮箱">
                        </div>
                    </div>
                    <!--拜访(2)，陪访(6)显示地址-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" th:if="${type} == 2 or ${type} == 6">
                        <label class="control-label label-required" for="address">地址</label>
                        <div class="form-content">
                            <input type="text" id="address" name="address" class="form-control" placeholder="请输入客户地址">
                        </div>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="customerIntention">客户意向</label>
                        <div class="form-content">
                            <div class="input-group">
                                <input type="text" maxlength="3" class="form-control" id="customerIntention" name="customerIntention" placeholder="请输输入客户意向" autocomplete="off" onkeyup="value=value.replace(/[^\d]/g,'')" value="0">
                                <span class="input-group-addon">%</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label " for="customerQuality">客户质量</label>
                        <div class="form-content">
                            <select class="form-control" name="customerQuality" id="customerQuality" type="text" title="请选择">
                                <option value="1">优</option>
                                <option value="2">良</option>
                                <option value="3">差</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="followPurpose">跟进目的</label>
                        <div class="form-content content-2">
                            <select onchange="followWay(this)" id="followPurpose" name="followPurpose" class="form-control" type="text" title="请选择">
                                <option value="1">产品跟进</option>
                                <option value="2">过程跟进</option>
                            </select>
                            <select id="wayItem" name="wayItem" class="form-control" type="text"  title="请选择" disabled></select>
                        </div>
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required" for="communicationTime">沟通时长</label>
                        <div class="form-content">
                            <div class="input-group">
                                <input type="text"  class="form-control" id="communicationTime" name="communicationTime" maxlength="3" placeholder="请输入沟通时长" onkeyup="value=value.replace(/[^\d]/g,'')">
                                <!--线上电话(1) 线下电话(4)-->
                                <!--<span class="input-group-addon" th:text="(${type} == 1 or ${type} == 4) ? ('秒') : ('分')"></span>-->
                                <span class="input-group-addon">分</span>
                            </div>
                        </div>
                    </div>
                    <!--拜访(2) 显示陪访人-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" th:if="${type} == 2">
                        <label class="control-label " for="accompanyingPerson">陪访人</label>
                        <div class="form-content">
                            <input type="text" id="accompanyingPerson" class="form-control" placeholder="请输入陪访人姓名">
                        </div>
                    </div>
                    <!--陪访(6) 显示主拜访人-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" th:if="${type} == 6">
                        <label class="control-label label-required">主拜访人</label>
                        <div class="form-content">
                            <input type="text" id="mainVisitor" name="mainVisitor" class="form-control" placeholder="请输入主拜访人姓名">
                        </div>
                    </div>
                    <!--微信(3) 显示微信号-->
                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" th:if="${type} == 3">
                        <label class="control-label label-required">微信号</label>
                        <div class="form-content">
                            <input type="text" id="wechat" name="wechat" class="form-control" placeholder="请输入客户微信号">
                        </div>
                    </div>

                    <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label ">线索评分</label>
                        <div class="form-content">
                            <div class="js-raty" id="clueScore" data-score="3" data-number="5"></div>
                        </div>
                    </div>
                    <div class="col-xs-12">
                        <label class="control-label ">线索标签</label>
                        <div class="form-content">
<!--                            <input type="text" data-role="tagsinput"  placeholder="新增标签" class="form-control tagsinput">-->
<!--                            <div id="tagBox" class="tags-box form-control"></div>-->
                            <input type="text" data-role="tagsinput" value="" placeholder="输入标签，回车确认" class="form-control tagsinput" >
                        </div>
                    </div>
                    <div class="form-group  col-xs-12">
                        <label class="control-label label-required" for="followDetail">跟进详情</label>
                        <div class="form-content">
                            <textarea  id="followDetail" name="followDetail" class="form-control"></textarea>
                        </div>
                    </div>
                    <!--<div class="col-xs-12">
                        <label class="control-label ">帮助说明</label>
                        <div class="form-content">
                            <textarea id="remark" class="form-control"></textarea>
                        </div>
                    </div>-->
                    <div class="col-xs-12">
                        <label class="control-label label-required">上传附件</label>
                        <!--拜访(2) 陪访(6)-->
                        <div class="form-content" th:if="${type} == 2 or ${type} == 6">
                            <div class="file-group">
                                <input type="file" accaccept=".png,.jpg,.jpeg,.bmp,.gif" class="hidden" />
                                <input type="hidden" id="visitScreen" class="image-id">
                                <div class="img-box"></div>
                                <button class="btn btn-default file-browser" type="button">上传拜访图片</button>
                            </div>
                        </div>
                        <!--微信(3)-->
                        <div class="form-content" th:if="${type} == 3">
                            <div class="file-group">
                                <input type="file" accaccept=".png,.jpg,.jpeg,.bmp,.gif" class="hidden" />
                                <input type="hidden" id="weChatScreen" class="image-id">
                                <div class="img-box"></div>
                                <button class="btn btn-default file-browser" type="button">上传聊天记录</button>
                            </div>
                        </div>
                        <!--邮箱(5)-->
                        <div class="form-content" th:if="${type} == 5">
                            <div class="file-group">
                                <input type="file" accaccept=".png,.jpg,.jpeg,.bmp,.gif" class="hidden" />
                                <input type="hidden" id="emailScreen" class="image-id">
                                <div class="img-box"></div>
                                <button class="btn btn-default file-browser" type="button">上传邮件截图</button>
                            </div>
                        </div>
                        <!--线上电话(1) 线下电话(4)-->
                        <div class="form-content" th:if="${type} == 1 or ${type} == 4">
                            <div class="file-group">
                                <input type="file" accaccept=".png,.jpg,.jpeg,.bmp,.gif" class="hidden" />
                                <input type="hidden" id="telScreen" class="image-id">
                                <div class="img-box"></div>
                                <button class="btn btn-default file-browser" type="button">上传电话账号页</button>
                            </div>
                            <div class="file-group">
                                <input type="file" accaccept=".png,.jpg,.jpeg,.bmp,.gif" class="hidden" />
                                <input type="hidden" id="timeScreen" class="image-id">
                                <div class="img-box"></div>
                                <button class="btn btn-default file-browser" type="button">上传电话时长页</button>
                            </div>
                        </div>
                        <p>上传图片格式：<code>.png</code>，<code>.jpg</code>，<code>.jpeg</code>，<code>.bmp</code>，<code>.gif</code></p>
                    </div>
                </div>
            </div>
            <div class="form-actions">
                <button class="btn btn-primary btn-label" type="button" onclick="addClueFollow();"><label><i class="mdi mdi-check"></i></label>提交</button>
                <button class="btn btn-default" type="button">取消</button>
            </div>
        </form>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 城市数据 -->
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/lightyear.js"></script>
<script src="/js/crm/common/common.js"></script>
<!-- 图表 -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<!--标签插件-->
<script type="text/javascript" src="/js/bootstrap-tagsinput/bootstrap-tagsinput.js"></script>
<!-- 评分插件 -->
<script type="text/javascript" src="/js/jquery.raty.js"></script>
<script src="/js/crm/followPlanManager/clueFollow.js"></script>
</html>